package org.domeos.framework.api.controller.common;

import javax.servlet.http.HttpServletRequest;

/**
 * api 接口公共
 * @author haqiaolong
 *
 */
public class BaseSreController {

	/**
	 * 获取用户ID
	 * @param request
	 * @return
	 */
	public String getUserId(HttpServletRequest request){
		if(request.getAttribute("userId") == null){
			return null;
		}
		return request.getAttribute("userId").toString();
	}
	
	public int getIntValue(String value){
		return Integer.valueOf(value);
	}
}
